const navConfig = require('../../src/data/nav.config')

const navs = navConfig.reduce((acc, nav)=>{
  acc.push({
    title: nav.title,
    collapsable: false,
    children: nav.list.map(item => `/components/${item.name}`)
  })
  return acc
}, [])

module.exports = {
  title: 'Hippius Ui',
  description: '简洁优雅/极致体验/应用优先',
  base: '/hippius-vue-ui/',
  serviceWorker: true,
  themeConfig: {
    nav: [
      { text: '指南', link: '/guide/start' },
      { text: '组件', link: '/components/HView' },
      { text: 'GitLab', link: 'https://rdc.hand-china.com/gitlab/hmap-cloud-develop/hippius-vue-ui' },
    ],
    sidebar: [
      {
        title: '指南',
        collapsable: false,
        children: [
          '/guide/start',
          '/guide/join'
        ]
      },
      ...navs
    ]
  }
}
